package com.jarvis.dubbo;

import com.jarvis.dubbo.pojo.ValidationModel;
import com.jarvis.dubbo.service.IMockService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * TODO XXX
 *
 * @author jarvis
 * created in 2020/9/18
 */
public class MockConsumer {
    public static void main(String[] args) throws Exception {
        ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("spring-context-consumer.xml");
        IMockService mockService = classPathXmlApplicationContext.getBean(IMockService.class);
        System.out.println(mockService.successRpc(new ValidationModel()));
        System.out.println(mockService.failRpc(new ValidationModel()));
    }
}
